package com.fa4j.system.account.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fa4j.common.data.model.Base;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;

import java.time.LocalDateTime;

/**
 * 账号密码
 *
 * @since 2025-05-06 16:16:26
 */
@Data
@TableName("t_sys_account_password")
@Schema(description = "账号密码")
public class AccountPassword extends Base {

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "账号ID")
    private Long accountId;

    @Schema(description = "密码类型")
    private AccountPasswordType type;

    @Schema(description = "密码")
    @ToString.Exclude
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String password;

    @Schema(description = "过期时间")
    private LocalDateTime expireTime;

    @Schema(description = "操作人ID")
    private Long operatorId;


}
